package com.iteaj.util;

import com.iteaj.util.core.UtilsFactory;
import com.iteaj.util.xml.XmlAdapter;

/**
 * jdk：1.8
 *
 * @author lcz
 * create time：2019/5/16
 */
public final class XmlUtils {

    public static String toXml(Object obj) {
        return UtilsFactory.getDefaultXmlAdapter().toXml(obj);
    }

    public static String toXml(Object obj, Object arg) {
        return null;
    }

    public static <T> T toBean(String xml, Class<T> clazz) {
        return UtilsFactory.getDefaultXmlAdapter().toBean(xml, clazz);
    }

    public static XmlAdapter getXmlAdapter() {
        return UtilsFactory.getDefaultXmlAdapter();
    }
}
